import { getTopStatusLabel } from '../../../utils/order';

export const columns = [
  // 订单状态
  {
    prop: 'status',
    label: '状态',
    width: 100,
    fixed: 'left',
    formatter: getTopStatusLabel,
    search: true
  },
  {
    prop: 'order',
    label: '订单信息',
    slot: 'orderSlot',
    width: 280,
    search: true
  },
  {
    prop: 'state',
    label: '配送信息',
    slot: 'logisticsSlot',
    width: 200,
    search: true
  },
  {
    prop: 'salesman',
    label: '下发业务员',
    slot: 'salesmanSlot',
    width: 160,
    search: true
  },
  {
    prop: 'logisticsStatus',
    label: '物流追踪',
    slot: 'logisticsStatusSlot',
    minWidth: 220,
    search: true
  },
  {
    prop: 'category',
    label: '类别',
    search: true,
    sortable: true,
    slot: 'categorySlot',
    width: 140
  },
  {
    prop: 'date',
    label: '下单/签收时间',
    slot: 'orderTimerSlot',
    width: 230
  },

  {
    prop: 'dosage',
    label: '商品数量',
    slot: 'dosageSlot',
    width: 200
  },

  // 大单奖励
  {
    prop: 'award',
    label: '大单奖励',
    slot: 'awardSlot',
    width: 100
  },

  // 订单金额
  {
    prop: 'orderAmount',
    label: '订单金额',
    slot: 'orderAmountSlot',
    width: 160
  },

  // 付款方式
  {
    prop: 'paymentMethod',
    label: '付款方式',
    search: true,
    slot: 'paymentMethodSlot'
  },

  // 是否到账
  // {
  //     prop: "isArrived",
  //     label: "是否到账",
  //     search: true,
  //     slot: "isArrivedSlot",
  // },
  // 核销状态
  {
    prop: 'writeOffStatus',
    label: '核销状态',
    search: true,
    fixed: 'left',
    slot: 'writeOffStatusSlot'
  },
  {
    prop: 'remark',
    label: '备注',
    slot: 'remarkSlot',
    width: 220
  },
  {
    prop: 'operation',
    label: '操作',
    fixed: 'right',
    slot: 'operationSlot',
    width: 120
  }
];
